#include "floracommunitybus.h"
#include "FloraLogger.h"
FloraCommunityBus::FloraCommunityBus()
{

}

void FloraCommunityBus::updateLoopCommands(QVector<commandTuple> commands)
{
    mutex.lock();
    loopCommandVec = commands;
    mutex.unlock();
}

void FloraCommunityBus::appendBurstCommand(commandTuple comand)
{
    brust_mutex.lock();
    burstCommandQue.append(comand);
    brust_mutex.unlock();
}

void FloraCommunityBus::run()
{

}



void FloraCommunityBus::startWork()
{
    running = true;
    QThread::start();
    LOG_DEBUG<<busName<<"线程开始";
}

void FloraCommunityBus::stop()
{
    running = false;
    quit();
    wait();
    LOG_DEBUG<<busName<<"线程结束";
}
